package com.vr.xuecheng.feign.client;

import com.vr.xuecheng.feign.dto.CourseIndex;
import com.vr.xuecheng.feign.fallback.CourseIndexFallbackFactory;
import com.vr.xuecheng.feign.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * @author hzh
 * @date 2025/03/22
 * 搜索服务feign接口
 */
@FeignClient(
        name = "xuecheng-plus-search-service",
        path = "/search",
        fallbackFactory = CourseIndexFallbackFactory.class,
        contextId = "courseIndexClient"
)
public interface CourseIndexClient {
    @PostMapping("/course/index")
    Result<String> addCourseIndex(@RequestBody CourseIndex courseIndex);
}
